#include "stdafx.h"
#include "./glCamera.h"
#include "./glTrace.h"

GLES::Void GLES::Camera::setEyeAt( Point3& point )
{
	_eyeAt = point;
	//egluLookAt(_eyeAt.x,_eyeAt.y,_eyeAt.z,_lookAt.x,_lookAt.y,_lookAt.z,_upDir.x,_upDir.y,_upDir.z);
}

GLES::Camera::Camera():
_eyeAt(0,0,1),
_lookAt(0,0,0),
_upDir(0,1,0)
{

}

GLES::Void GLES::Camera::setLookAt( Point3& point )
{
	_lookAt = point;
	//gluLookAt(_eyeAt.x,_eyeAt.y,_eyeAt.z,_lookAt.x,_lookAt.y,_lookAt.z,_upDir.x,_upDir.y,_upDir.z);
}

GLES::Void GLES::Camera::setUpDir( Vector3& vect )
{
	_upDir = vect;
	//gluLookAt(_eyeAt.x,_eyeAt.y,_eyeAt.z,_lookAt.x,_lookAt.y,_lookAt.z,_upDir.x,_upDir.y,_upDir.z);
}

GLES::Void GLES::Camera::setFov(Float left,Float right,Float bottom,Float top,Float zNear,Float Far)
{
	glFrustumf(left,right,bottom,top,zNear,Far);
}

GLES::Void GLES::Camera::setPerspective(Float fovy,Float aspect,Float zNear, Float zFar)
{
	//gluPerspective(fovy,aspect,zNear, zFar);
}

GLES::Void GLES::Camera::setOrtho(Float left,Float right,Float bottom,Float top, Float zNear,Float zFar)
{
	glMatrixMode(GL_PROJECTION);
	glOrthof(left,right,bottom,top, zNear,zFar);
}

GLES::Void GLES::Camera::setOrtho2D( Float left,Float right,Float bottom,Float top )
{
	//gluOrtho2D(left,right,bottom,top);
}

GLES::Void GLES::Camera::setViewport(Int32 x,Int32 y,Int32 w,Int32 h)
{
	//glViewport (x,y,w,h);
}